package components.asteroids;


import images.Images;

import java.awt.Color;
import java.util.ArrayList;
import java.util.List;


import com.uqbar.vainilla.appearances.Rectangle;

public class AsteroidLvl2 extends Asteroid {


	public AsteroidLvl2(double x, double y) {
		super(20, 2, 1, 35, 200,  3, x, y);
		this.setAppearance(Images.images.getImage("asteroid2"));
	}


	public List<Asteroid> getFragments(){
		List<Asteroid> parts = new ArrayList<Asteroid>();
		AsteroidLvl1 a1, a2;
		a1 = new AsteroidLvl1(this.getX(), this.getY());
		a1.setDirVectX(this.getDirVectX() + 1);
		a1.setDirVectY(this.getDirVectY());
		a1.setSpeed(this.getFragmentsSpeed());
		
		a2 = new AsteroidLvl1(this.getX(), this.getY());
		a2.setDirVectX( -this.getDirVectX());
		a2.setDirVectY( -getDirVectY() +1);
		a2.setSpeed(this.getFragmentsSpeed());
		parts.add(a1); parts.add(a2);
		
		return parts;
	}
}
